const jellyfin = require('../src/utils/media-server/jellyfin-server');
const config = require('./test-config');

; (async () => {

    await jellyfin.setup(config.jellyfin);

    // const mediasCount = await jellyfin.getMediasCount()

    // console.log('mediasCount:', mediasCount);

    // const activityLog = await jellyfin.getActivityLog(10)
    // console.log('activityLog:', activityLog);

    try {
        // const admin = await jellyfin.getAdminUser()
        // console.log('admin: ', admin);

        // const seriesId = await jellyfin.getSeriesIdByName('龙之家族', 2022);
        // console.log('seriesId: ', seriesId);

        const episodes = await jellyfin.getTvEpisodes('She-Hulk: Attorney at Law', undefined, 1)
        console.log('episodes: ', episodes);

        // const no_exists_episodes = await jellyfin.getNoExistsTvEpisodes('She-Hulk: Attorney at Law', undefined, 1, 9);
        // console.log('no_exists_episodes: ', no_exists_episodes);

        // const movie = await jellyfin.getMovie('坠落', '2022');
        // console.log('movie: ', movie);
        // await jellyfin.getLibrarys();
    } catch (error) {
        console.log(error);
    }
})();